package com.cpecc.model.wuzi;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.cpecc.model.system.HuanJie;
import com.cpecc.model.system.User;

@Entity
@Table(name = "DATA_TUIHUO_JILU")
public class TuiHuoJL implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4811255122358380606L;

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(length = 32)
	private String id;
	
	@ManyToOne
	@JoinColumn(name="TUIHUO_ID")
	private TuiHuo tuiHuo;
	
	@ManyToOne
	@JoinColumn(name="USER_ID")
	private User user;
	
	@Column
	private Date caoZuoRQ;
	
	@Column(length=64)
	private String piFuNR;
	
	@Column(length=8)
	private String piFuLX;
	
	@ManyToOne
	@JoinColumn(name="HUANJIE_ID")
	private HuanJie huanJie;

	public String getId() {
		return id;
	}
	
	public void setId(String id) {
		this.id = id;
	}
	
	public TuiHuo getTuiHuo() {
		return tuiHuo;
	}
	
	public void setTuiHuo(TuiHuo tuiHuo) {
		this.tuiHuo = tuiHuo;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Date getCaoZuoRQ() {
		return caoZuoRQ;
	}

	public void setCaoZuoRQ(Date caoZuoRQ) {
		this.caoZuoRQ = caoZuoRQ;
	}

	public String getPiFuNR() {
		return piFuNR;
	}

	public void setPiFuNR(String piFuNR) {
		this.piFuNR = piFuNR;
	}

	public String getPiFuLX() {
		return piFuLX;
	}

	public void setPiFuLX(String piFuLX) {
		this.piFuLX = piFuLX;
	}	

	public HuanJie getHuanJie() {
		return huanJie;
	}

	public void setHuanJie(HuanJie huanJie) {
		this.huanJie = huanJie;
	}

	public TuiHuoJL(String id, TuiHuo tuiHuo, User user, Date caoZuoRQ,
			String piFuNR, String piFuLX, HuanJie huanJie) {
		super();
		this.id = id;
		this.tuiHuo = tuiHuo;
		this.user = user;
		this.caoZuoRQ = caoZuoRQ;
		this.piFuNR = piFuNR;
		this.piFuLX = piFuLX;
		this.huanJie = huanJie;
	}

	public TuiHuoJL() {
		super();
	}	
}
